package com.waves.design.prototype;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 抽象原型是接口、具体原型是里面的克隆方法
 */
@Data
@Accessors(chain = true)
public class Person implements Cloneable{
    private String name;

    private String sex;

    private Integer age;


    @Override
    protected Person clone()  {
        try {
            return (Person)super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
